<div class="menu">
<h2 class="h2-title">Thông tin chuyên mục !!!</h2>

<?php if(isset($msg) AND $msg != ''):?>
<ul class="notification err">
    <li class="notifi_img"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_circle.png"/></li>

    <li class="msg"><?=$msg?></li>

    <li class="close"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_grey_small.png"/></li>

</ul><!--End of .notification -->

<?php else:?>

<div class="form_input_index">
    <ul class="form_text">
    <form action="<?=base_url()?>backend/menu/editmenu/<?=$menu->menu_id?>" method="POST">
        <li class="text_input">Tên chuyên mục</li>
        <li><input type="text" value="<?=$menu->menu_name?>" name="menu_name" class="input-post"/></li>
        <?= form_error('menu_name','<li class="errors">','</li>'); ?>

        <li class="text_input">Tên chuyên mục không dấu</li>
        <li><input type="text" value="<?=$menu->menu_title?>" name="menu_title" class="input-post"/></li>
        <?= form_error('menu_title','<li class="errors">','</li>'); ?>

        <li class="text_input">Chuyên mục cha</li>

        <select name="menu_parent">
            <option value="0">Không có</option>
            <?php if(!empty($menus)):?>
                <?php foreach($menus as $row_menu):?>
                    <option value="<?=$row_menu->menu_id?>" <?php if($row_menu->menu_id == $menu->menu_parent) echo " selected "?>><?=$row_menu->menu_name?></option>
                <?php endforeach;?>
            <?php endif;?>
        </select>

        <li class="text_input">Trạng thái</li>

        <select name="menu_status">
            <option value="1" <?php if($menu->menu_status == 1) echo " selected "?>>Hiển thị</option>
            <option value="0" <?php if($menu->menu_status == 0) echo " selected "?>>Ẩn</option>
        </select>

        <li class="text_input">Vị trí</li>
        <li><input type="text" value="<?=$menu->menu_order?>" name="menu_order" class="input-post"/></li>
        <?= form_error('menu_order','<li class="errors">','</li>'); ?>

        <input type="submit" class="sub" value="Đồng ý" name="sub"/>
        <input type="reset" class="sub" value="Nhập lại" name="sub"/>
    </form>
    </ul>
</div>

<?php endif;?>
</div>
